package com.rfid.db.bean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;

import java.util.Objects;

@Entity
public class Operation {
    public static int OPERATE_LOCATE = 1;
    public static int OPERATE_CHECK = 2;
    public static int OPERATE_SHANGJIA = 3;
    public static int OPERATE_DELETE= 4;
    @Id(autoincrement = true)
    @Property(nameInDb="id")
    Long id;
    long rfid;
    int operation;
    String date;
    String user;
    int status;//记录错架等信息
    int upload;//记录是否上传

    @Generated(hash = 1248567049)
    public Operation(Long id, long rfid, int operation, String date, String user,
            int status, int upload) {
        this.id = id;
        this.rfid = rfid;
        this.operation = operation;
        this.date = date;
        this.user = user;
        this.status = status;
        this.upload = upload;
    }

    @Generated(hash = 1326595030)
    public Operation() {
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Operation operation = (Operation) o;
        return rfid == operation.rfid;
    }

    @Override
    public int hashCode() {
        return Objects.hash(rfid, date);
    }
    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return this.id;
    }

    public long getRfid() {
        return this.rfid;
    }

    public void setRfid(long rfid) {
        this.rfid = rfid;
    }

    public int getOperation() {
        return this.operation;
    }

    public void setOperation(int operation) {
        this.operation = operation;
    }

    public String getDate() {
        return this.date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getUser() {
        return this.user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getUpload() {
        return this.upload;
    }

    public void setUpload(int upload) {
        this.upload = upload;
    }
}
